package com.karry.yl.dao.baseinfo;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.karry.commons.base.SuperMapper;
import com.karry.yl.domain.baseinfo.Bed;
import com.karry.yl.domain.elder.ElderlyBebs;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface BedMapper extends SuperMapper<Bed> {
    List<Bed> selectBedList(Pagination page, @Param("orgId") Long orgId,@Param("buildingId")Long buildingId,@Param("floor")String floor,@Param("roomId")Long roomId);

    @Select("select count(*) from bed where deleted = 0 and roomId = #{roomId} and status > 1")
    int countByRoomId(Long roomId);

    List<Bed> selectBedListByBuidFloor(Bed bed);

    List<ElderlyBebs> selectBedsByRid(Bed bed);

    Bed selectBedById(Bed bed);
}
